package com.demo.mysql.base;

/**
 * 切库的类
 * @author hushengdong
 */
public class DataSourceSelector {

    private static ThreadLocal<String> threadLocal = new ThreadLocal();

    private DataSourceSelector() {
    }

    public static String get() {
        return (String)threadLocal.get();
    }

    public static void set(String dataSourceType) {
        threadLocal.set(dataSourceType);
    }

    public static void clear() {
        threadLocal.remove();
    }
}
